Skip to content

feat: add 2-stage tracing with cProfile for Top N function selection#1009

Closed
KRRT7 wants to merge 2 commits into
mainfrom
feat/two-stage-tracing
Closed

feat: add 2-stage tracing with cProfile for Top N function selection#1009
KRRT7 wants to merge 2 commits into
mainfrom
feat/two-stage-tracing

Conversation

@KRRT7
Copy link
Copy Markdown
Contributor

@KRRT7 KRRT7 commented Jan 4, 2026

Use cProfile (Stage 1) for fast profiling to identify high-impact functions, then run detailed tracer (Stage 2) only on Top N functions by addressable time.

Use cProfile (Stage 1) for fast profiling to identify high-impact functions, then run detailed tracer (Stage 2) only on Top N functions by addressable time.
@KRRT7 KRRT7 requested a review from misrasaurabh1 January 4, 2026 23:26
MAX_REPAIRS_PER_TRACE = 4 # maximum number of repairs we will do for each function

# 2-stage tracing
DEFAULT_TOP_N_FUNCTIONS = None # None means no limit, optimize all above threshold
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what number this should be

@KRRT7
Copy link
Copy Markdown
Contributor Author

KRRT7 commented Apr 23, 2026

Moving this to codeflash-agent — will reopen there.

@KRRT7 KRRT7 closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant